\(\int \frac {1-x^4}{1+x+x^2+x^3} \, dx\) [181]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 9 \[ \int \frac {1-x^4}{1+x+x^2+x^3} \, dx=x-\frac {x^2}{2} \]

[Out]

x-1/2*x^2

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {1600} \[ \int \frac {1-x^4}{1+x+x^2+x^3} \, dx=x-\frac {x^2}{2} \]

[In]

Int[(1 - x^4)/(1 + x + x^2 + x^3),x]

[Out]

x - x^2/2

Rule 1600

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

Rubi steps \begin{align*} \text {integral}& = \int (1-x) \, dx \\ & = x-\frac {x^2}{2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.00 \[ \int \frac {1-x^4}{1+x+x^2+x^3} \, dx=x-\frac {x^2}{2} \]

[In]

Integrate[(1 - x^4)/(1 + x + x^2 + x^3),x]

[Out]

x - x^2/2

Maple [A] (verified)

Time = 0.02 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.78

method result size
gosper \(-\frac {x \left (-2+x \right )}{2}\) \(7\)
default \(x -\frac {1}{2} x^{2}\) \(8\)
norman \(x -\frac {1}{2} x^{2}\) \(8\)
risch \(x -\frac {1}{2} x^{2}\) \(8\)
parallelrisch \(x -\frac {1}{2} x^{2}\) \(8\)
parts \(x -\frac {1}{2} x^{2}\) \(8\)

[In]

int((-x^4+1)/(x^3+x^2+x+1),x,method=_RETURNVERBOSE)

[Out]

-1/2*x*(-2+x)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.78 \[ \int \frac {1-x^4}{1+x+x^2+x^3} \, dx=-\frac {1}{2} \, x^{2} + x \]

[In]

integrate((-x^4+1)/(x^3+x^2+x+1),x, algorithm="fricas")

[Out]

-1/2*x^2 + x

Sympy [A] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 5, normalized size of antiderivative = 0.56 \[ \int \frac {1-x^4}{1+x+x^2+x^3} \, dx=- \frac {x^{2}}{2} + x \]

[In]

integrate((-x**4+1)/(x**3+x**2+x+1),x)

[Out]

-x**2/2 + x

Maxima [A] (verification not implemented)

none

Time = 0.34 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.78 \[ \int \frac {1-x^4}{1+x+x^2+x^3} \, dx=-\frac {1}{2} \, x^{2} + x \]

[In]

integrate((-x^4+1)/(x^3+x^2+x+1),x, algorithm="maxima")

[Out]

-1/2*x^2 + x

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.78 \[ \int \frac {1-x^4}{1+x+x^2+x^3} \, dx=-\frac {1}{2} \, x^{2} + x \]

[In]

integrate((-x^4+1)/(x^3+x^2+x+1),x, algorithm="giac")

[Out]

-1/2*x^2 + x

Mupad [B] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 6, normalized size of antiderivative = 0.67 \[ \int \frac {1-x^4}{1+x+x^2+x^3} \, dx=-\frac {x\,\left (x-2\right )}{2} \]

[In]

int(-(x^4 - 1)/(x + x^2 + x^3 + 1),x)

[Out]

-(x*(x - 2))/2